package com.hyt.it.ogt.kq.service.bm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyt.core.base.BaseCheckEntity;
import com.hyt.it.ogt.kq.service.bm.model.entity.NonOpenInfo;
import com.hyt.it.ogt.kq.service.bm.model.entity.StudentInfo;
import com.hyt.it.ogt.kq.service.bm.model.param.NonOpenInfoSaveParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.NoOpenParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.NoOpenQueryParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.NonOpenInfoVO;
import com.hyt.it.ogt.kq.service.gov.model.param.BatchSelectStudentSaveParam;
import com.hyt.it.ogt.kq.service.gov.model.param.BatchSubjectSettingParam;
import com.hyt.it.ogt.kq.service.gov.model.param.ImportStudentQualificationsCheckParam;
import com.hyt.it.ogt.kq.service.gov.model.param.ImportStudentQualificationsDataParam;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @since 2020-06-03
 */
public interface INonOpenService extends IService<NonOpenInfo> {

    String DOT = "、";

    String[] EXCEL_FILE_TYPE = {"xls", "xlsx"};

    IPage<NonOpenInfoVO> queryPage(NoOpenParam projectParam);

    void deleteStudent(String string);

    int statQualifications(String projectId, Set<String> deptIds);

    void downStudentDemo(HttpServletResponse response, String projectId);

    void importStudentQualificationsData(ImportStudentQualificationsDataParam param);

    /**
     * 查询当前身份证号码是否已添加
     *
     * @param nonOpenInfo
     * @return
     */
    int queryByCard(NonOpenInfoSaveParam nonOpenInfo);

    void updateBm(String studentId, String projectId);

    NonOpenInfo queryStudentByCardNum(String projectId, String cardNum);

    /**
     * 新增/编辑-非开放报名考生
     *
     * @param nonOpenInfo
     */
    void saveOrUpdateStudent(NonOpenInfoSaveParam nonOpenInfo);

    /**
     * 批量删除考生
     *
     * @param studentId
     */
    void batchDeleteStudent(String studentId);

    void batchSelectStudentSave(BatchSelectStudentSaveParam batchSelectStudentSaveParam);

    /**
     * 批量选择考生校验
     *
     * @param batchSelectStudentSaveParam
     * @return
     */
    BaseCheckEntity batchSelectStudentCheck(BatchSelectStudentSaveParam batchSelectStudentSaveParam);

    /**
     * 获取报名平台考生
     *
     * @param projectId 报名ID
     * @return
     */
    List<String> getStudentBaseIds(String projectId);

    /**
     * 批量导入数据校验
     *
     * @param importStudentQualificationsCheckParam
     * @return
     */
    BaseCheckEntity importStudentQualificationsCheck(ImportStudentQualificationsCheckParam importStudentQualificationsCheckParam);

    /**
     * 批量设置科目
     *
     * @param param
     */
    void batchSubjectSetting(BatchSubjectSettingParam param);

    /**
     * 校验报名考生是否有资格
     *
     * @param projectId
     */
    Boolean checkStudentHasQualifications(String projectId, List<StudentInfo> studentInfos, List<String> subjectIds);

    void exportNonOpenInfo(NoOpenQueryParam projectParam) throws Exception;
    
    /***
     * 获取报名资格数据
     * @param projectId
     * @param studentInfos
     * @return
     */
    List<NonOpenInfo> getStudentQualificationByIdcard(String projectId, List<StudentInfo> studentInfos);
}
